package com.xcn.dsxm.main_public.database.service;

import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;

import java.util.HashMap;
import java.util.List;

public interface DbService_xcn_admin {


    /**
     * 1-插入数据
     */
    public int insert(String sql);

    public int insert(String mybatisId, HashMap<String, Object> params);


    /**
     * 2-删除数据
     */
    public int delete(String sql);

    public int delete(String mybatisId, HashMap<String, Object> params);


    /**
     * 3-更新数据
     */
    public int update(String sql);

    public int update(String mybatisId, HashMap<String, Object> params);


    /**
     * 4-查询多个结果
     */
    public JSONArray more(String sql);

    public JSONArray more(String mybatisId, HashMap<String, Object> params);


    /**
     * 4-查询一条结果
     */
    public JSONObject one(String sql);

    public JSONObject one(String mybatisId, HashMap<String, Object> params);

    /**
     * 6-执行事务
     */
    public int transaction(List<String> sqlArr);

    public int transactions(HashMap<String, Object>... sqlArr);

    public int transactions(List<HashMap<String, Object>> sqlArr);

}
